//1引入express模块
var express =  require('express');
// 2 创建路由对象
var router = express.Router();
// 3 处理路径
router.post("/one",(req,resp)=>{

   //console.log(req.body.name,req.body.age,req.body.gender);

   setTimeout(() => {
      resp.end("11111111");
   }, Math.random()*5000);

}) 


router.get("/two",(req,resp)=>{

   setTimeout(() => {
      resp.end("22222222");
   }, Math.random()*5000)
})

   router.get("/three",(req,resp)=>{

     // console.log(req.query.classname);
   
     setTimeout(() => {
      resp.end("3333333");
   }, Math.random()*5000);

});

//暴露接口
module.exports=router;
